# -*- coding: utf-8 -*-
"""
file:ch2_5x从-1向0-逼近时y的极限
author: Fuwen
time: 2022/7/15 7:10
software:PyCharm
"""
# x 的邻域 (-1,0)，x逼近0-时 y的极限 为-无穷， y=1/x， 函数发散

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-1,-0.0001, 10001)
y = [1/i for i in x]

plt.axis([-1, 1, -10001, 10001])
plt.plot(x, y, '--')
plt.xlabel('n')
plt.ylabel('y')
plt.grid()
plt.show()
